<template>
    <div class="center-box">
        <div class="title">
            <img src="../../assets/hqrepair/title-bg.png">
            <span class="txt">单位评价分析</span>
        </div>
        <div class="data-boxs">
            <div class="left">
                <div class="pingfen item1">
                    <img src="../../assets/hqrepair/pingfen3.png">
                    <span class="txt title">好评</span>
                    <span class="txt num">{{ data.hp }}<span class="prent">%</span></span>
                </div>  
                <div class="pingfen item1">
                    <img src="../../assets/hqrepair/pingfen1.png">
                    <span class="txt title">一般</span>
                    <span class="txt num">{{ data.yb }}<span class="prent">%</span></span>
                </div>
                <div class="pingfen item1">
                    <img src="../../assets/hqrepair/pingfen2.png">
                    <span class="txt title">差评</span>
                    <span class="txt num">{{ data.cp }}<span class="prent">%</span></span>
                </div>
            </div>
            <div class="right">
                <Echart :id="id" :options="options" :t="t" height="100%" width="100%"></Echart>
            </div>
        </div>
    </div>
</template>
<script>
import Echart from '@/common/echart'
export default {
    data() {
        return {
            id: "center_3"
        }
    },
    components: {
        Echart,
    },
    props: {
        options: {
            type: Object,
            default: () => ({})
        },
        data: {
            type: Object,
            default: () => ({})
        },
        t: {
            type: String,
            default: '0'
        }
    },
}
</script>

<style lang="scss" scoped>
$box-width: 100%;
$box-height: 100%;
$box_padding_tb: 20px;

.center-box {
    height: $box-height;
    width: $box-width;

    .title {
        position: relative;
        font-size: 1.2vw;
        line-height: 2vw;
        text-shadow: 2px 1px 0px rgba(0, 31, 61, 0.46);
        color: #fff;
        font-family: DingTalk JinBuTi;
        margin-top: 0.2vw;

        img {
            height: 2vw;
        }
        .txt {
            position: absolute;
            left: 20px;
            top: -0.2vw;
        }
    }

    .data-boxs {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: $box_padding_tb;
        padding: 0 0.5vw;
        height: calc(100% - 2.8vw);
        .left {
            flex-basis: 10%;
            display: flex;
            flex-direction: column;
            justify-content: space-around;

            .pingfen {
                width: 3.8vw;
                height: 3.8vw;
                position: relative;

                img {
                    width: 100%;
                    height: 100%;
                }

                .txt {
                    position: absolute;
                    display: block;
                    width: 100%;
                    text-align: center;

                    &.title {
                        bottom: 0.1vw;
                        font-size: 0.6vw;
                        font-weight: normal;
                        font-family: Alibaba_255;
                    }

                    &.num {
                        top: 1.1vw;
                        font-family: DINPro;
                        font-size: 1.1vw;

                        .prent {
                            font-size: 0.6vw;
                        }
                    }
                }
            }
        }

        .right {
            flex-basis: 90%;
        }
    }
}
</style>